/**
 * @version 2007-5-10
 * @author xalinx at gmail dot com
 */
package org.nanhill.commons.dbutil.dialect;

/**
 * @version 2007-5-10
 * @author xalinx at gmail dot com
 * 
 */
public class DialectFactory {
	private Dialect dialect;

	public void setDriverClassName(String driverClassName) {
		if (driverClassName.equals("com.mysql.jdbc.Driver")) {
			dialect = new Mysql5Dialect();
		} else if (driverClassName.equals("org.hsqldb.jdbcDriver")) {
			dialect = new HsqlDialect();
		} else if (driverClassName.equals("oracle.jdbc.driver.OracleDriver")) {
			dialect = new Oracle9Dialect();
		}
	}

	public Dialect getDialect() {
		return dialect;
	}

}
